package com.jic.manager.mapper;

import com.jic.conf.request.rest.CmsModuleAndDataRequest;
import com.jic.manager.entity.CmsPage;
import com.jic.conf.response.rest.CmsGetIndexPageConfResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 页面信息�
 * @author : 
 * @email : 
 * @since : 2020-03-05 12:00:37
 * @version : v1.0.0
 */
@Mapper
public interface  CmsPageMapper {

    long insert(CmsPage cmsPage);

    long delete(Long id);

    long update(CmsPage cmsPage);

    CmsPage queryByPrimaryKey(@Param("id") Long id);

    List<CmsPage> query(CmsPage cmsPage);

    List<CmsPage> queryPage(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("cmsPage") CmsPage cmsPage);

    long queryPageCount(CmsPage cmsPage);
    
    long lowerCmspage(Long id);
    
    List<CmsPage> queryPages(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("cmsPage") CmsPage cmsPage);

    long queryPagesCount(@Param("cmsPage") CmsPage cmsPage);

    CmsGetIndexPageConfResponse queryInfoByStatus(@Param("request") CmsModuleAndDataRequest request);
    /**
     * CMS_PAGE根据id删除数据
     * @param cmsPage 入参实体�
     */
    int deleteByPrimaryKey(CmsPage cmsPage);


    /**
     * CMS_PAGE插入数据
     * @param cmsPage 入参实体�
     */
    int insertSelective(CmsPage cmsPage);

    /**
     * CMS_PAGE根据主键查询数据
     * @param cmsPage 入参实体�
     */
    CmsPage selectByPrimaryKey(CmsPage cmsPage);

    /**
     * CMS_PAGE分页查询总记录数
     * @param cmsPage 入参实体�
     */
    long listPageCount(CmsPage cmsPage);

    /**
     * CMS_PAGE根据主键查询数据
     * @param cmsPage 入参实体�
     */
    List<CmsPage> listCmsPageRecordPagination(@Param("startIndex") int pageIndex, @Param("limit") int pageSize, CmsPage cmsPage);

    /**
     * CMS_PAGE查询数据
     * @param cmsPage 入参实体�
     */
    List<CmsPage>  selectBySelective(CmsPage cmsPage);

    /**
     * CMS_PAGE根据表对象数据修改数�
     * @param cmsPage 入参实体�
     */
    int updateByPrimaryKey(CmsPage cmsPage);

    /**
     * CMS_PAGE根据表对象数据修改数�
     * @param cmsPage 入参实体�
     */
    int updateByPrimaryKeySelective(CmsPage cmsPage);

    long updateSoldOut(CmsPage cmsPage);

}